msg = 'abcdefgabc'
# (欲被替换的内容,使用该内容替换原内容，替换数量)
print(msg.replace('abc','ahha',2))

input_content = 'evol'
output_content = '1234'
msg = 'I love you'
trantab = msg.maketrans(input_content,output_content)
print(msg.translate(trantab))
